import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'

import echarts from './views/charts/echarts.vue'

import Department from "./views/org/Department";
import Employee from "./views/org/Employee";

//系统配置
import Config from "./views/sysmanage/Config";
import Dictionary from "./views/sysmanage/Dictionary";
import Dictionaryitem from "./views/sysmanage/Dictionaryitem";

//产品模块
import Product from "./views/prod/Product";
import ProductType from "./views/prod/ProductType";

//营销模块
import Activity from "./views/maket/Activity";
import ActivityRemark from "./views/maket/ActivityRemark";
import Business from "./views/maket/Business";
import BusinessRemark from "./views/maket/BusinessRemark";
import Clue from "./views/maket/Clue";
import ClueRemark from "./views/maket/ClueRemark";
import ClueActivity from "./views/maket/ClueActivity";
import BusinessProduct from "./views/maket/BusinessProduct";

//订单模块
import Order from "./views/order/Order";



let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        leaf:true,  // 设置leaf=true,说明该节点是叶子节点,那么它下面就不会再有子菜单了
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-s-custom',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理'},
            { path: '/employee', component: Employee, name: '员工管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '产品模块',
        iconCls: 'el-icon-s-promotion',//图标样式class
        children: [
            { path: '/product', component: Product, name: '产品管理'},
            { path: '/productType', component: ProductType, name: '产品类型' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单模块',
        iconCls: 'el-icon-s-promotion',//图标样式class
        children: [
            { path: '/order', component: Order, name: '订单管理'},
        ]
    },
    {
        path: '/',
        component: Home,
        name: '营销模块',
        iconCls: 'el-icon-scissors',
        children: [
            { path: '/activity', component: Activity, name: '营销活动' },
            { path: '/activityRemark', component: ActivityRemark, name: '营销活动备注' },
            { path: '/clue', component: Clue, name: '线索管理' },
            { path: '/clueRemark', component: ClueRemark, name: '线索管理备注' },
            { path: '/clueActivity', component: ClueActivity, name: '线索活动' },
            { path: '/business', component: Business, name: '商机管理' },
            { path: '/businessRemark', component: BusinessRemark, name: '商机管理备注' },
            { path: '/businessProduct', component: BusinessProduct, name: '商机产品管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-s-tools',
        children: [
            { path: '/config', component: Config, name: '系统配置' },
            { path: '/dictionary', component: Dictionary, name: '数据字典' },
            { path: '/dictionaryitem', component: Dictionaryitem, name: '数据字典明细' }
        ]
    },


    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;